package util.AST.Terminal;

import util.Visitor;
import checker.SemanticException;

/**
 * AST class
 * @version 2010-september-04
 * @discipline Compiladores
 * @author Gustavo H P Carvalho
 * @email gustavohpcarvalho@ecomp.poli.br
 */
public class BooleanValue extends Terminal {

	private String tipo;
	
	public String getTipo() {
		return tipo;
	}

	public void setTipo(String tipo) {
		this.tipo = tipo;
	}

	public BooleanValue(String spelling) {
		super(spelling);
	}

	@Override
	public String toString(int level) {
		return "Boolean(" + this.getSpelling()+") (" + this.tipo +")\n";
	}
	
	public String toStringDecorada(int level) {
		return toString(level);
	}

	@Override
	public Object visit(Visitor v, Object arg) throws SemanticException {
		return v.visitBooleanValue(this, arg);
	}

}
